package com.sdutcm.Config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.nio.charset.Charset;
import java.util.List;

/*
 *@Author Yan
 *@Create 2019-08-20 20:12
 */
@Configuration
public class MyConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/lendadd").setViewName("lend-add");
        registry.addViewController("/").setViewName("index");
        registry.addViewController("/findClass").setViewName("class-find");
        registry.addViewController("/index").setViewName("index");
        registry.addViewController("/stuadd").setViewName("student-add");

    }
}
